<?php
//checking for customer loged or not - this is restriction script
error_reporting (E_ALL ^ E_NOTICE);
require_once("admin/dbconnect.php");
session_start();
?>
<?

	if($_REQUEST['cid']){
	$st="SELECT customer.customer_id, customer.name,customer.online_status, customer.surname, customer.father_name, customer.address, customer.image_1, customer.b_date, customer.age, customer.gender, community.community, nativeplace.nativeplace, customer.other_city, occupation.occupation, customer.email, customer.tel, customer.mob, customer.marital_status, country.country, state.state, customer.home_status, customer.blood_group, customer.feetInch, customer.feetCm, customer.weightKg, customer.weightlbs, customer.bodytype, customer.complexion, degree.degree, stream.stream, customer.other_education, customer.income, customer.curency, customer.incometype, customer.aboutfamily, customer.expectation, customer.reference, customer.father_info, customer.brother_info, customer.sister_info, customer.family_member, customer.earning_member, DATE_FORMAT(customer.online, '%d-%M-%Y') as dton
	FROM ((((((customer LEFT JOIN nativeplace ON customer.city = nativeplace.nativeplace_id) LEFT JOIN country ON customer.country = country.country_id) LEFT JOIN state ON customer.state = state.state_id) LEFT JOIN degree ON customer.degree = degree.degree_id) LEFT JOIN stream ON customer.stream = stream.stream_id) LEFT JOIN community ON customer.community = community.community_id) LEFT JOIN occupation ON customer.occupation = occupation.occupation_id where customer.status = 'Y' and customer.customer_id=".$_REQUEST['cid'];
	$rc = mysql_query($st) or die(mysql_error());
	if($row=mysql_fetch_array($rc)){
?>
<?
	
	$st1="SELECT distinct(visited_profiles.visited_member_id) from visited_profiles where visited_profiles.viewed_member_id= '".$row['customer_id']."'";
	$rs = mysql_query($st1) or die(mysql_error());
    $cnt = mysql_num_rows($rs);
?>
<? if ($_SESSION['ep_customer_name'] && $row['customer_id']!= $_SESSION['ep_customer_id']) { 
$sql ="INSERT INTO `visited_profiles` (`id` ,`viewed_member_id` ,`visited_member_id`)VALUES (NULL , '".$row['customer_id']."', '".$_SESSION['ep_customer_id']."');";
$update=mysql_query($sql) or die(mysql_error());
}
?>
<?php require_once('include/header.php'); ?>

      <div id="middle_container_for_innerpage">
      <div id="innerpage_top_image"><img src="/images/images/innerpage_top_corner_820x5.jpg"  height="5" /></div>
      <div id="middle_inner_container">
      
            <?php require_once('include/left_menu.php'); ?>
            
        
        
        <div id="inner_page_middle_data">
        	<div id="profile_search_top">
            	
                <div id="profile_search_top_link2"><a href="#" onClick="javascript:history.back();">Back to Search Result</a></div>
                
          </div>
        	<div id="page_heading">Profile</div>
        	<div id="profile_page_container">
            	<div id="php_select">
            		
                </div>
                <div id="profile_photo_brief_info_container">
                	<div id="profile_photo">
                   	  <div align="center" id="profile_photo_small">
                              <?php
                              if($row['image_1']==''){
                                 $row['image_1']= 'default_eparinay_bride.jpg';
                              }

                              ?>
                        	<? if($row['image_1']){?>
            <div id="gallery">
            <a href="/uploaded/profile/<?=$row['image_1']?>" title="<?=$row['name']?>">
                <img src="/uploaded/thumb/<?=$row['image_1']?>"  alt="<?=$row['name']?>" />
            </a>
            </div>
                                    <?}else{?>
                    			<a href="profile.php?cid=<?php echo $row['customer_id']; ?>"><?if($row['gender']=="Male"){?><img src="/images/images/default_eparinay_groom.jpg" width="90" height="90" border="0" class="image_border" ><?} else{?>
				<img src="/images/images/default_eparinay_bride.jpg" width="90" height="90" border="0" class="image_border" ><?}?></a>
                    		<?}?>
                   	  </div>
                    <div id="profile_photo_zoom">
                        <div id="small_icon">
                        <a href="/uploaded/profile/<?=$row['image_1']?>" title="<?=$row['name']?>">
                        <img src="/images/images/zoomIn.gif" alt="Enlarge photo" width="18" height="18" border="0" />
                        </a>
                        </div>
                            <div id="enlarge-pic">
                                    <a href="/uploaded/profile/<?=$row['image_1']?>" title="<?=$row['name']?>">Enlarge photo</a>
                            </div>
                    </div>
                </div>
                    <div id="profile_brief_info">
                    	
                    	<div id="profile_page_id"><div id="profile_id_new" style="margin-right:163px; border:none;">Profile ID: <?=$row['customer_id']?></div>
                    	  <div id="online_offline_icons">

                        <?if($row['online_status']=="online"){?>
                        <div style="float:left">Online:</div>
                        <?php }else{?>
                        <div style="float:left">Offline:</div>
                            <?php } ?>
                    	<div id="small_icon">
                        <?if($row['online_status']=="online"){?>
                        <img src="/images/images/status_online.png" alt="Online" title="Online" width="16" height="16" />
                        <?php }else{?>
                        <img src="/images/images/status_offline.png" alt="Offline" title="Offline" width="16" height="16" />
                            <?php } ?>
                        </div>

                    </div>

                        <div id="profile_page_name"><strong><?=$row['name']?></strong></div>
                        <div id="profile_page_last_online">
                        	<div id="profile_id_new">
                            	<div id="small_icon"><img src="/images/images/icon_user.gif" alt="Last Onlie" width="16" height="16" /></div>
                        		<span class="green">Last online:</span> <?= $row['dton'] ? "" : "12-Febuary-2008" ?><?php echo $row['dton']; ?>
                                </div>
                          <div id="profile_id_new">
                            	<div id="small_icon"><img src="/images/images/blood_group.gif" alt="Blood Group" title="Blood Group" width="16" height="16" /></div>
                           	  Blood Group: <?= $row['blood_group'] ? $row['blood_group'] : "Unknown" ?></div>
                        </div>
                        <div id="profile_page_age_occu_res">
                            <div id="profile_page_age">
                           	  <div id="profile_id_new"><div id="small_icon"><img src="/images/images/icon_alert.gif" alt="Age" width="16" height="15" /></div>
                           	  Age: <?=$row['age']?></div>
                                <div id="profile_id_new"><div id="small_icon"><img src="/images/images/icon_extension.gif" alt="Residing" width="16" height="16" /></div>
                                Residing: <?=$row['nativeplace']?></div>
                </div>
                            <div id="profile_page_occupation">
                            	<div id="profile_id_new"><div id="small_icon"><img src="/images/images/tie.gif" alt="Occupation" width="16" height="16" /></div>
                           	  Occupation: <?=$row['occupation']?></div>
                                <div id="profile_id_new"><div id="small_icon"><img src="/images/images/dollar.gif" alt="Monthly Income" width="16" height="16" /></div>
                              Monthly Income: <?=$row['currency']?> <?=$row['income']?></div>
                </div>
                        </div>
                        <div id="profile_page_mobile">
                       	  <div id="profile_id_new"><div id="small_icon"><img src="/images/images/telephone.png" alt="Telephone" width="16" height="16" /></div>
							 <? if($_SESSION['ep_customer_name']) {?>
                        	<?=$row['tel']?>
                            <?} else {?>
                         <a href="/register.php" >Register to see Telephone</a>
                        <? } ?>
                              
                              </div>
                            <div id="profile_id_new"><div id="small_icon"><img src="/images/images/phone.png" alt="Mobile" width="16" height="16" /></div>
							 <? if($_SESSION['ep_customer_name']) {?>
                        	<?=$row['mob']?>
                            <?} else {?>
                        <a href="/register.php" >Register to see Mobile</a>
                        <? } ?>
                                
                            </div>
                           
							
						</div>
                        <div id="profile_page_email"><div id="small_icon"><img src="/images/images/icon_email.gif" alt="Email" width="16" height="16" /></div>
							 <? if($_SESSION['ep_customer_name']) {?>
                        	Email is Hidden by this Member
                            <?} else {?>
                        <a href="/register.php" >Register to see Email Address</a>
                        <? } ?>
                           
                        </div>
                        <div id="profile_page_visited_profiles"><div id="small_icon"><img src="/images/images/find_posts.png" alt="Last 10 visited profiles" width="16" height="16" /></div>
                      Last 10 visited profiles: <? if(@mysql_num_rows($rs)>0){
					  while($row1=mysql_fetch_array($rs)){ ?><a href="profile.php?cid=<?=$row1['visited_member_id'];?>"><?=$row1['visited_member_id'];?></a>, <? }} else{ ?>No registered User visited to your Profile<?}?></div>
                    </div>
                </div>
                <div id="profile_preferred_partner">
                  <p class="bgDarkSkyBlue">My preferred partner</p><p class="profile_preferred"><?= $row['expectation']; ?></p></div>
                <div id="profile_row">
               	  <div id="profile_middle" style="width:135px;">
           	      <div id="small_icon"><a href="#"><img src="/images/images/tick.png" alt="Show your interest" width="16" height="16" border="0" /></a></div>
           	      <a href="#">Show your interest</a></div>
                    <div id="profile_middle" style="width:180px;">
                  <div id="small_icon"><a href="#"><img src="/images/images/clock.png" alt="Remind me this profile next time I logged in" width="16" height="16" border="0" /></a></div>
                  <a href="#">Remind this profile next time</a></div>
                  <div id="profile_middle" style="width:130px;">
                  <div id="small_icon"><a href="#"><img src="/images/images/comment_yellow.gif" alt="Leave your comment" width="16" height="16" border="0" /></a></div>
                  <? if($_SESSION['ep_customer_id']) {?>
<a href="/send_message.php?send_to=<?php echo $row['customer_id']; ?>">Send Message</a>
 <?} else {?>
<a href="/send_message_fail.php">Send Message</a>
 <? } ?></div>
                  <div id="profile_middle" style="width:120px;">
                  <div id="small_icon"><a href="#"><img src="/images/images/printer.png" alt="Print this profile" width="16" height="16" border="0" /></a></div>
                  <a href="#" onclick="javascript:self.print();">Print this profile</a></div>
                </div>
                <div id="profile_row"><p>Profile in details...</p></div>
                <div id="profile_row">
                	<p class="bgColor">Personal Profile</p>
                    <div id="personal_profile_details_left">
                    	<div id="static_dynamic2"><div id="static">First Name</div><div id="dynamic">: <?=$row['name']?></div></div>
                        <div id="static_dynamic"><div id="static">Last Name</div><div id="dynamic">: <?=$row['surname']?></div></div>
                        <div id="static_dynamic2"><div id="static">Age</div><div id="dynamic">: <?=$row['age']?></div></div>
                        <div id="static_dynamic"><div id="static">Date of birth</div><div id="dynamic">: <?=$row['b_date']?></div></div>
                        <div id="static_dynamic2"><div id="static">Gender</div><div id="dynamic">: <?=$row['gender']?></div></div>
                        <div id="static_dynamic"><div id="static">Community</div><div id="dynamic">: 
                          <?=$row['community']?>
                        </div>
                      </div>
                        <div id="static_dynamic2"><div id="static">Mother Tongue</div><div id="dynamic">: <?=$row['community']?></div></div>
                        <div id="static_dynamic">
                       	  <div id="static">Telephone</div>
                          <div id="dynamic">:
								
                        		<? if($_SESSION['ep_customer_name']) {?>
                        	<?=$row['tel']?>
                            <?} else {?>
                         <a href="/register.php" >Register to see Telephone</a>
                        <? } ?>
                            	
                            </div>
                      </div>
                        <div id="static_dynamic2">
                       	  <div id="static">Mobile</div>
                          <div id="dynamic">: 
                            	
                        		<? if($_SESSION['ep_customer_name']) {?>
                        	<?=$row['mod']?>
                            <?} else {?>
                        <a href="/register.php" >Register to see Mobile</a>
                        <? } ?>
                            	
                          </div>
                      </div>
                        <div id="static_dynamic">
                       	  <div id="static">Email ID</div>
                          <div id="dynamic" style="color:#0066FF;">: 
                            	
                        		<? if($_SESSION['ep_customer_name']) {?>
                        	Email is Hidden by this Member
                            <?} else {?>
                        <a href="/register.php" >Register to see Email Address</a>
                        <? } ?>
                            	
                          </div>
                      </div>
                        <div id="static_dynamic2"><div id="static">Marital Status</div><div id="dynamic">: <?=$row['marital_status']?></div></div>
                        <div id="static_dynamic"><div id="static">Childrens</div><div id="dynamic">: </div>
                        </div>
                    </div>
                    <div id="personal_profile_details_right">
                    	<div id="static_dynamic2"><div id="static">Height</div><div id="dynamic">: <?=$row['feetInch']?> Centimetres</div></div>
                        <div id="static_dynamic"><div id="static">Weight</div><div id="dynamic">: <?=$row['weightKg']?> Kg</div></div>
                        <div id="static_dynamic2"><div id="static">Body Type</div><div id="dynamic">: <?=$row['bodytype']?></div></div>
                        <div id="static_dynamic"><div id="static">Complexion</div><div id="dynamic">: <?=$row['complexion']?></div></div>
                        <div id="static_dynamic2"><div id="static"><div id="small_icon"><img src="/images/images/blood_group.gif" width="16" height="16" /></div>
                        Blood Group</div>
                        <div id="dynamic">: Unknown </div>
                      </div>
                        <div id="static_dynamic"><div id="static"><div id="small_icon"><img src="/images/images/icon_home.gif" width="16" height="16" /></div>
                        Home Status</div><div id="dynamic">: <?=$row['home_status']?></div></div>
                        <div id="static_dynamic2"><div id="static">Address</div>
                        <div id="dynamic" style="overflow-x:hidden;">: <? if($_SESSION['ep_customer_name']) {?>
                        	<?=$row['address']?>
                            <?} else {?>
                        <a href="/register.php" >Register to see Full Address</a>
                        <? } ?></div>
                      </div>
                        <div id="static_dynamic"><div id="static">City</div><div id="dynamic">: <?=$row['nativeplace']?></div></div>
                        <div id="static_dynamic2"><div id="static">Other City</div><div id="dynamic">: <?=$row['other_city']?></div></div>
                        <div id="static_dynamic"><div id="static">State</div><div id="dynamic">: <?=$row['state']?></div></div>
                        <div id="static_dynamic2"><div id="static">Country</div><div id="dynamic">: <?=$row['country']?></div></div>
                    </div>
                </div>
                <div id="profile_row">
                	<p class="bgColor">Professional Profile</p>
                    <div id="personal_profile_details_left">
                    	<div id="static_dynamic2"><div id="static">Occupation</div><div id="dynamic">: <?=$row['occupation']?></div></div>
                        <div id="static_dynamic"><div id="static">Monthly Income</div>
                        <div id="dynamic">:  
                          <?=$row['income']?></div>
                      </div>
                        <div id="static_dynamic2"><div id="static">Currency</div><div id="dynamic">: <?=$row['curency']?></div></div>
                    </div>
                    <div id="personal_profile_details_right">
                    	<div id="static_dynamic2"><div id="static">Heighest Degree</div><div id="dynamic">: <?=$row['degree']?></div></div>
                        <div id="static_dynamic"><div id="static">Stream</div><div id="dynamic">: <?=$row['stream']?></div></div>
                        <div id="static_dynamic2"><div id="static">Other Education</div><div id="dynamic">: <?=$row['other_education']?></div></div>
                    </div>
                </div>
                <div id="profile_row">
                	<p class="bgColor">Family Profile</p>
                    <div id="personal_profile_details_left">
                    	<div id="static_dynamic2"><div id="static">Father's Name</div><div id="dynamic">: <?=$row['father_name']?></div></div>
                        <div id="static_dynamic"><div id="static">Father's Info</div><div id="dynamic">: <?=$row['father_info']?></div></div>
                        <div id="static_dynamic2"><div id="static">Mother's Name</div><div id="dynamic">: <?=$row['mother_name']?></div></div>
                        <div id="static_dynamic"><div id="static">Mother's Info</div><div id="dynamic">: <?=$row['mother_info']?></div></div>
                    </div>
                    <div id="personal_profile_details_right">
                      <div id="static_dynamic2"><div id="static">Brother's Info</div><div id="dynamic">: <?=$row['brother_info']?></div></div>
                        <div id="static_dynamic"><div id="static">Sister's Info</div><div id="dynamic">: <?=$row['sister_info']?></div></div>
                        <div id="static_dynamic2"><div id="static">About Family</div><div id="dynamic">: <?=$row['aboutfamily']?></div></div>
                        <div id="static_dynamic"><div id="static">Family Members</div><div id="dynamic">: <?=$row['family_member']?></div></div>
                        <div id="static_dynamic2"><div id="static">Earning Members</div><div id="dynamic">: <?=$row['earning_member']?></div></div>
                    </div>
                </div>
                <div id="profile_row">
                	<p class="bgColor">Other</p>
                    <p>Profile created by: <?=$row['reference']?></p>
                </div>
                <div id="profile_row">
                	<div id="force_registration">
                    	<p><strong>Not a member yet?</strong> <a href="/register.php">Register to eParinay.com</a></p>
                        <p>Become a member to express interest in 
                        <strong><?=$row['name']?> <?=$row['surname']?></strong></p>
                      <p>Register to eParinay in TEN SECONDS!<br />
                        Because we give respect to your valuable TIME!</p>
                    </div>
                    <div id="register_button_on_profile"><a href="/register.php"><img src="/images/images/register_to_ep.jpg" width="170" height="30" alt="Register to eParinay.com" title="Register to eParinay.com" border="0" /></a></div>
                </div>
                <div id="profile_search_top">
            	
                <div id="profile_search_top_link2"><a href="#" onClick="javascript:history.back();">Back to Search Result</a></div>
                

<div id="google_ad" style="">
<script type="text/javascript"><!--
google_ad_client = "pub-4949877136251097";
/* 468x60, created 7/18/10 */
google_ad_slot = "0254499042";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="/http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
          </div>
		  <div id="code"><?} else {?></div>
            <div id="profile_row"><span class="mediumredbold">Oops! Record not found.</span></div>
            <div id="code"><?}?>
            <?} else {?></div>
            <div id="profile_row"><span class="mediumredbold">Oops! Illegal Operation.</span></div>
            <div id="code"><?}?></div>
            </div>
	     </div>
		 
       
       
      </div> 
      <div id="corner_container_bottom_for_innerpage"><img src="/images/images/innerpage_bottom_corner_820x10.jpg"  height="10" /></div>
    </div> 
      <!-- middle_container ends -->
    
    
        
    
<?php require_once('include/footer.php'); ?>
